﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using ThridGroup.ERP.DTO.SupplierDto;

namespace ThridGroup.ERP.ProductionSystem
{
    /// <summary>
    /// 供应商管理接口     ---tsh
    /// </summary>
    public interface ISupplierModelServices : IApplicationService
    {
        /// <summary>
        /// 获取供应商分页列表
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns>分页结果</returns>
        Task<PagedResultDto<SupplierDto>> GetSupplierPagedListAsync(QuerySupplierDto query);
        
        /// <summary>
        /// 根据ID获取供应商信息
        /// </summary>
        /// <param name="id">供应商ID</param>
        /// <returns>供应商信息</returns>
        Task<SupplierDto> GetSupplierByIdAsync(int id);
        
        /// <summary>
        /// 创建供应商
        /// </summary>
        /// <param name="input">创建供应商输入</param>
        /// <returns>创建结果</returns>
        Task<bool> CreateSupplierAsync(CreateSupplierDto input);
        
        /// <summary>
        /// 更新供应商
        /// </summary>
        /// <param name="input">更新供应商输入</param>
        /// <returns>更新结果</returns>
        Task<bool> UpdateSupplierAsync(UpdateSupplierDto input);
        
        /// <summary>
        /// 删除供应商
        /// </summary>
        /// <param name="id">供应商ID</param>
        /// <returns>删除结果</returns>
        Task<bool> DeleteSupplierAsync(int id);
        
        /// <summary>
        /// 自动生成供应商编码
        /// </summary>
        /// <returns>供应商编码</returns>
        Task<string> GenerateSupplierCodeAsync();
        
        /// <summary>
        /// 批量删除供应商
        /// </summary>
        /// <param name="ids">供应商ID列表</param>
        /// <returns>删除结果</returns>
        Task<bool> BatchDeleteSupplierAsync(List<int> ids);
    }
}
